package com.junzhiit.nengji.cms.web.controller;

import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import com.junzhiit.nengji.cms.service.MemberCardHistoryService;
import com.junzhiit.nengji.cms.web.vo.DataTablesParamVO;
import com.junzhiit.nengji.cms.web.vo.MemberCardHistoryVO;
import com.junzhiit.nengji.cms.web.vo.ResultVO;

import io.swagger.annotations.ApiOperation;

@RestController
@RequestMapping("/member/card/history")
public class MemberCardHistoryController {

	@Autowired
	MemberCardHistoryService memberCardHistoryService;
	
	@ApiOperation(value="获取会员卡交易记录列表")
	@RequestMapping(method=RequestMethod.GET)
	public Map<String,Object> queryForList(DataTablesParamVO dtp,MemberCardHistoryVO memberCardHistoryVO){
		return memberCardHistoryService.queryForList(dtp, memberCardHistoryVO);
	}
	
	@ApiOperation(value="获取会员卡交易统计信息")
	@RequestMapping(value="/total",method=RequestMethod.GET)
	public ResultVO findForTotal(String sessionId){
		return memberCardHistoryService.findForTotal(sessionId);
	}
}
